package com.mrd.gtimpframe.entity;

import java.io.Serializable;
import java.util.Date;

public class SysLog implements Serializable {
    private String id;

    private String account;

    private Date ctime;

    private String execMethod;

    private String costTimeMs;

    private String fromIp;

    private String isexcept;

    private String exception;

    private static final long serialVersionUID = 1L;

    public SysLog(String id, String account, Date ctime, String execMethod, String costTimeMs, String fromIp, String isexcept, String exception) {
        this.id = id;
        this.account = account;
        this.ctime = ctime;
        this.execMethod = execMethod;
        this.costTimeMs = costTimeMs;
        this.fromIp = fromIp;
        this.isexcept = isexcept;
        this.exception = exception;
    }

    public SysLog() {
        super();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account == null ? null : account.trim();
    }

    public Date getCtime() {
        return ctime;
    }

    public void setCtime(Date ctime) {
        this.ctime = ctime;
    }

    public String getExecMethod() {
        return execMethod;
    }

    public void setExecMethod(String execMethod) {
        this.execMethod = execMethod == null ? null : execMethod.trim();
    }

    public String getCostTimeMs() {
        return costTimeMs;
    }

    public void setCostTimeMs(String costTimeMs) {
        this.costTimeMs = costTimeMs == null ? null : costTimeMs.trim();
    }

    public String getFromIp() {
        return fromIp;
    }

    public void setFromIp(String fromIp) {
        this.fromIp = fromIp == null ? null : fromIp.trim();
    }

    public String getIsexcept() {
        return isexcept;
    }

    public void setIsexcept(String isexcept) {
        this.isexcept = isexcept == null ? null : isexcept.trim();
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception == null ? null : exception.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", account=").append(account);
        sb.append(", ctime=").append(ctime);
        sb.append(", execMethod=").append(execMethod);
        sb.append(", costTimeMs=").append(costTimeMs);
        sb.append(", fromIp=").append(fromIp);
        sb.append(", isexcept=").append(isexcept);
        sb.append(", exception=").append(exception);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysLog other = (SysLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
            && (this.getCtime() == null ? other.getCtime() == null : this.getCtime().equals(other.getCtime()))
            && (this.getExecMethod() == null ? other.getExecMethod() == null : this.getExecMethod().equals(other.getExecMethod()))
            && (this.getCostTimeMs() == null ? other.getCostTimeMs() == null : this.getCostTimeMs().equals(other.getCostTimeMs()))
            && (this.getFromIp() == null ? other.getFromIp() == null : this.getFromIp().equals(other.getFromIp()))
            && (this.getIsexcept() == null ? other.getIsexcept() == null : this.getIsexcept().equals(other.getIsexcept()))
            && (this.getException() == null ? other.getException() == null : this.getException().equals(other.getException()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
        result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
        result = prime * result + ((getExecMethod() == null) ? 0 : getExecMethod().hashCode());
        result = prime * result + ((getCostTimeMs() == null) ? 0 : getCostTimeMs().hashCode());
        result = prime * result + ((getFromIp() == null) ? 0 : getFromIp().hashCode());
        result = prime * result + ((getIsexcept() == null) ? 0 : getIsexcept().hashCode());
        result = prime * result + ((getException() == null) ? 0 : getException().hashCode());
        return result;
    }
}